geocompr_style = structure(
  list(
    frame = FALSE
  ),
  style = "geocompr"
)

library(tmap)
tmap_options(geocompr_style)

# plot test --------------------------------------------------------------------
library(spData)
tm_shape(nz) + 
  tm_polygons("Median_income")

# default values - reference ----------------------------------------------
# .defaultTmapOptions <- structure(
#   list(
#     unit = "metric",
#     limits = c(facets.plot = 64, facets.view = 4),
#     max.categories = 30,
#     show.messages = TRUE,
#     title = NA,
#     scale = 1,
#     title.size = 1.3,
#     bg.color = "white",
#     aes.color = c(
#       fill = "grey85",
#       borders = "grey40",
#       symbols = "grey60",
#       dots = "black",
#       lines = "black",
#       text = "black",
#       na = "grey75",
#       null = "grey95"
#     ),
#     aes.palette = list(seq = "YlOrBr", div = "RdYlGn", cat = "Set3"),
#     attr.color = "black",
#     sepia.intensity = 0,
#     saturation = 1,
#     frame = TRUE,
#     frame.lwd = 1,
#     frame.double.line = FALSE,
#     asp = NA,
#     outer.margins = rep(0.02, 4),
#     inner.margins = NA,
#     between.margin = .5,
#     outer.bg.color = NULL,
#     fontface = "plain",
#     fontfamily = "",
#     compass.type = "arrow",
#     earth.boundary = FALSE,
#     earth.boundary.color = NULL,
#     #attr.color,
#     earth.boundary.lwd = 1,
#     earth.datum = "WGS84",
#     space.color = NULL,
#     legend.show = TRUE,
#     legend.only = FALSE,
#     legend.outside = NA,
#     legend.outside.position = "right",
#     legend.outside.size = 0.3,
#     legend.position = NULL,
#     legend.stack = "vertical",
#     legend.just = c("left", "bottom"),
#     legend.width = 0.4,
#     legend.height = 0.9,
#     legend.hist.height = 0.3,
#     legend.hist.width = 0.4,
#     #legend.width,
#     legend.title.size = 1.1,
#     legend.text.size = 0.7,
#     legend.hist.size = 0.7,
#     legend.format = list(
#       fun = NULL,
#       scientific = FALSE,
#       digits = NA,
#       text.separator = "to",
#       text.less.than = c("Less", "than"),
#       text.or.more = c("or", "more"),
#       text.align = NA,
#       text.to.columns = FALSE
#     ),
#     legend.frame = FALSE,
#     legend.frame.lwd = 1,
#     legend.text.color = NULL,
#     #attr.color,
#     legend.bg.color = NA,
#     legend.bg.alpha = 1,
#     legend.hist.bg.color = NA,
#     legend.hist.bg.alpha = 1,
#     title.snap.to.legend = NA,
#     title.position = c("left", "top"),
#     title.color = NULL,
#     #attr.color,
#     title.bg.color = NA,
#     title.bg.alpha = 1,
#     panel.show = NA,
#     panel.labels = NA,
#     panel.label.size = 1,
#     panel.label.color = "black",
#     panel.label.bg.color = "grey80",
#     panel.label.height = 1.25,
#     panel.label.rot = c(90, 0),
#     main.title = NA,
#     main.title.size = 1.5,
#     main.title.color = "black",
#     main.title.position = "left",
#     attr.outside = FALSE,
#     attr.outside.position = "bottom",
#     attr.outside.size = NA,
#     attr.position = c("right", "bottom"),
#     attr.just = c("left", "bottom"),
#     design.mode = FALSE,
#     basemaps = c("Esri.WorldGrayCanvas", "OpenStreetMap", "Esri.WorldTopoMap"),
#     basemaps.alpha = c(1, 1, 1),
#     overlays = NULL,
#     overlays.alpha = 1,
#     alpha = NA,
#     colorNA = NA,
#     projection = 3857,
#     symbol.size.fixed = FALSE,
#     dot.size.fixed = TRUE,
#     text.size.variable = FALSE,
#     bbox = NULL,
#     set.bounds = FALSE,
#     set.view = NA,
#     set.zoom.limits = NA,
#     view.legend.position = c("right", "top"),
#     control.position = c("left", "top"),
#     popup.all.data = NULL
#   ),
#   style = "white"
# )
